home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
system
/
bufstuff.zip
/
BUFSTUFF.DOC
next >
Wrap
Text File
|
1991-10-09
|
7KB
|
144 lines
Buffer Stuffer 1.2
Have you ever wished that your batch files (like
AUTOEXEC.BAT) could do more with your programs than simply
start them running. For example, have you wished that they
could get you past the title page screens (the good old
"Press ENTER to continue." screen) and get you to the
menu option you usually use. Buffer Stuffer allows you to do
this. When a batch file calls Buffer Stuffer from DOS with a
command line string, that string is stuffed into the
keyboard buffer, then the Buffer Stuffer program ends.
The next program to run can input this string of keys as if
it were typed from the keyboard.
For example, suppose that you have a word processor with
a file name WP.EXE. Suppose that every time you run this
program, you must press the ENTER key to clear the title
page. You don't like the default screen colors, so you always
press F3 to choose the "Change screen colors" menu, then type
"F" and then 15 and press ENTER to change the foreground
color to 15 (bright white). Then you press Esc to return to
the main menu. With Buffer Stuffer, you could create a GO.BAT
file that does all this. The batch file would simply have the
commands
\BUFSTUFF ~(ENTER)~(F3)F15~(ENTER)~(ESC)
WP
This batch file causes Buffer Stuffer to stuff the desired
keys into the buffer, then runs the WP program. The keys are
not taken off the buffer until the WP program is running.
This example assumes that the BUFSTUFF.EXE file is in
your root directory. This is a very good place to put it, so
it can be easily accessed from any directory. An alternative
is to put it in a directory that is in your PATH.
Notice the words and abbreviations enclosed in
parentheses preceded by the ~ symbol. This is the method used
to indicate special characters that should not be output
literally. Anything preceded by ~( and followed by ) will be
interpreted as a single special character. For example,
~(ENTER) or ~(RETURN) will be interpreted as a carriage
return (CHR$(13)). There can be only one character within
each set of parentheses. For example, to write two returns,
you must write ~(RETURN)~(RETURN), not ~(RETURNRETURN). Some
other special words are UP, DOWN, RIGHT, LEFT (representing
the cursor keys), ESC, PGUP, PGDN, HOME, END, TAB, and F1
through F10. You can precede the F1 through F10 with an S
for shift, a C for Ctrl, or an A for Alt, as in SF1 or AF10.
The F1 through F10 are the only keys that respond to
being preceded by an S, since you can put in other
capitalized letters directly. However, the letters A through
Z do respond to being preceded by A or C within the ~(), such
as ~(CC) for Ctrl-C or ~(AH) for Alt-H. The characters 0
through 9 also respond to being preceded by an A, allowing
you to input the characters Alt-0 through Alt-9. You can also
proceed HOME, END, PGDN, PGUP, RIGHT, and LEFT with C (such
as CHOME) to produce keys such as Ctrl-Home. Incidentally,
although normal characters (those not enclosed within
parentheses preceded by ~) are case-sensitive, the special
characters within the parentheses are case-insensitive. This
means that it does not matter if you capitalize the letters
within the parentheses.
One last option is to put a pure number within the
parentheses. This will pack the ASCII character with that
value into the buffer. For example, ~(13) would be the same
as ~(return), since the ASCII value of a carriage return is
13. Another example would be that ~(7) would sound a beep,
since CHR$(7) is a beep.
There is one restriction on the string that Buffer Stuffer
can stuff into the buffer. It cannot be longer than 15
characters. If you try to input a string of more than 15
characters, Buffer Stuffer will abort with an error message.
Note that this refers to 15 characters in the string that
Buffer Stuffer packs into the buffer, not the string you put
in the command line. For example, ~(return) and ~(SF1) each
counts as one character, not as nine or six. Also, the name
BUFSTUFF and anything that precedes it, such as a path
designation, does not count as part of the 15 characters. The
space between BUFSTUFF and the start of the command string
does not count as a character either.
One other minor problem you might have with Buffer
Stuffer is inputting spaces in the command line. This is no
problem if you want the spaces to be in the middle of the
string of characters you want Buffer Stuffer to stuff.
However, a space will not register if it is the first or last
character in the command line string. The simplest way to
avoid this problem is to use ~(32) to represent a space in
your string, since 32 is the ASCII value of a space.
Compatibility
Buffer Stuffer is compatible with most programs. A few
programs, however, may not work with Buffer Stuffer. This is
generally because they read characters directly from the
keyboard, rather than the buffer.
Installation
I suggest that you put BUFSTUFF.EXE in your root
directory. That way, you can have a batch file in any
directory call it easily with the command \BUFSTUFF. Since
you will probably be having batch files call it from many
directories, that is easier than always having the batch
files need a command like \DOS\BUSTUFF. The alternative is to
have BUFSTUFF.EXE in a directory that is in your PATH
statement, but that would slow down operations slightly while
your computer searches for BUFSTUFF.EXE.
Paying for Buffer Stuffer
Buffer Stuffer is a shareware program. If you like it, please
pay for it by sending $5.00 to:
Leithauser Research
4649 Van Kleeck Drive
New Smyrna Beach FL 32169
In addition to a clear conscience, you will receive a
disk containing other shareware and freeware programs by
Leithauser Research. You are, of course, under no obligation
to register these programs unless you also decide to keep
using them.
Custom Programming
The primary function of Leithauser Research is custom
computer programming. If you need an unusual program that you
cannot find commercially, contact us at the above address for
a price quote. Our rates are very reasonable. You acquire all
rights to the programs you hire us to write, so you can
market these programs yourself if you like.